<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"  %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>航空票务系统-预定航班</title>
<link href="css/gouwuche.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" type="text/css" href="css/splitPage.css"/>
<script type="text/javascript" src="<%=basePath%>js/jquery-1.3.1.js"></script>
<link rel="stylesheet" type="text/css" href="<%=basePath%>css/showTickets.css"/>
<script type="text/javascript">
		 jQuery(document).ready(function() {
		     jQuery(".xtable tr").mouseover(function() {   
		         jQuery(this).addClass("ovr");  
		     }).mouseout(function() {
		         jQuery(this).removeClass("ovr");
		     });
		     jQuery(".xtable tr:even").addClass("even"); 
	 	}); 
		 $(function(){
				$("#page").change(function(){
					var page = $("#page").val();
					window.location.href="ArrangeInfo!getAllFlightArrangeInfo?page=" + page;
				});
			});
	</script>

</head>

<body>
<div class="box">
<!--表头logo、导航条-->
<jsp:include page="top.jsp"></jsp:include>
	<div id="main">
		<div class="main-wenzi">我的购物车&nbsp;&nbsp;<a href="OrderInfo!clearShoppingCart"><b>清空购物车</b></a></div>
		<div id="wodedingdan">
			<div id="wodedingdan-top"></div>
		  <div id="wodedingdan-main">
          <div class="table">
          			<table width="100%" cellspacing="1" class="xtable" id="xtable">
	
	<tbody>
	<s:if test="#session.shoppingCart.size == 0">
	<tr>
		<td colspan="8">您还没有预订任何机票
		</td>
	</tr>
	</s:if>
	<s:iterator value="#session.shoppingCart">
      <tr id="TRID" class="TRSTYLE">
        <td height="30" width="" align="center" width="8%">
        	<s:property value="flight.flight_name"/>
        </td>
        <td height="30" align="center" width="18%">
        	<s:property value="startDate"/>
        </td>
        <td height="30" align="center" width="17%">
        	<s:property value="flight.start_flight"/>
        </td>
        <td height="30" align="center" width="17%">
        	<s:property value="flight.end_flight"/>
        </td>
        <td height="30" align="center" width="10%">
        	<s:property value="flight.flight_type"/>
        </td>
        <td height="30" align="center" width="10%">
        	￥<s:property value="flight.price"/>
        </td>
		<td height="30" align="center" width="10%">
			<a onclick="this.disabled=true" href="OrderInfo!addOrderItemInfo?orderItem.flightArrange.id=<s:property value="id"/>&orderItem.user.id=<s:property value="#session.Logined.id"/>">
			<img onclick="this.disabled=true" border="0" alt="确定" src="<%=basePath %>images/sure.gif"/></a>
		</td>
		<td height="30" align="center" width="10%">
			<a href="OrderInfo!removeShoppingCartById?id=<s:property value="id"/>">
			<img onclick="this.disabled=true" border="0" alt="取消" src="<%=basePath %>images/cancel.gif"/></a>
		</td>
      </tr>
      </s:iterator>
	  </tbody>
    </table>
            </div>
          
          
          </div>
		</div>
		<div class="main-wodedingdan-main">
			<div class="main-wenzi">我的订单</div>
		</div>
		<div id="yudingdingdan">
			<div id="yudingdingdan-top"></div>
		  <div id="yudingdingdan-main">
          <td align="center">
		<table width="100%" cellspacing="1" class="xtable" id="xtable">
	<thead>
	<s:if test="pageBean.list.size == 0">
	<td colspan="8">
			您还没有预订任何机票
	</td>
	</s:if>
		
    </thead>
	<tbody>

	<s:iterator value="pageBean.list">
      <tr id="TRID" class="TRSTYLE">
	        <td height="30" align="center" width="10%"><s:property value="id"/></td>
			<td height="30" align="center" width="15%"><s:property value="flightArrange.flight.flight_name"/></td>
	        <td height="30" align="center" width="17%"><s:property value="flightArrange.startDate"/></td>
	        <td height="30" align="center" width="13%"><s:property value="flightArrange.flight.start_flight"/></td>
	        <td height="30" align="center" width="16%"><s:property value="flightArrange.flight.end_flight"/></td>
	        <td height="30" align="center" width="9%"><s:if test="isPayed == 0">未支付</s:if><s:else>已支付</s:else></td>
	        <td height="30" align="center" width="10%">￥<s:property value="flightArrange.flight.price"/></td>
			<td height="30" align="center" width="10%">
				<a href="OrderInfo!deleteOrderItemInfo?orderItem.id=<s:property value="id"/>"><img alt="退票" border="0" src="<%=basePath %>images/rebunt.gif"/></a>
			</td>
      	</tr>
      </s:iterator>
	  </tbody>
    </table>
          
          </div>
  <table width="100%">
  <tr height="25px">
  	<td width="30%" align="left">
		共检索到
		<s:property value="pageBean.allRow" />
		条记录
	</td>
	<td align="right" id="pagelist">
		  <ul>
		  	<li>
		  	
		  	</li>
		    <li class="pageinfo">共<s:property value="pageBean.totalPage" />页</li>
		    <li class="pageinfo">第<s:property value="pageBean.currentPage" />页</li>
		    <s:if test="%{pageBean.currentPage != pageBean.totalPage}">
				<li><a href="OrderInfo!getOrderItemInfoByUserId?page=<s:property value="pageBean.totalPage"/>">尾页</a></li>
				<li><a href="OrderInfo!getOrderItemInfoByUserId?page=<s:property value="%{pageBean.currentPage+1}"/>">下一页</a></li>
			</s:if>
		  	<s:if test="%{pageBean.currentPage == 1}"></s:if>
		  	<s:else>
				<li><a href="OrderInfo!getOrderItemInfoByUserId?page=<s:property value="%{pageBean.currentPage-1}"/>">上一页</a></li>
				<li><a href="OrderInfo!getOrderItemInfoByUserId?page=1">首页</a></li>
			</s:else>
		  </ul>
	</td>
  	</tr>
  	</table>
  	</td>
          </div>
	</div>
		<div class="bottom">
    
    <table width="100%" border="0"  class="STYLE4" style="font-size: 12px" >
    <tr>
    <td><br/></td>
    </tr>
      <tr  >
        <td align="center">友情链接：<a href="http://www.google.com">Google </a>| <a href="http://cn.bing.com">Bing </a>| <a href="http://www.baidu.com">百度</a></td>
      </tr>
      <tr>
        <td align="center">邮箱地址：0100121215@live.com 联系电话：001401001</td>
      </tr>
      <tr>
        <td align="center">Copyright&copy; 2011-2013 版权所有AIRLINE.COM</td>
      </tr>
    </table>
    
     </div>
</div>
</body>
</html>